package com.skb.task.mapper;

import com.skb.task.pojo.Project;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProjectMapper {
    /**
     *分页根据条件查询项目信息
     * @param project 封装了项目数据
     * @param start  开始查询位置
     * @param limit  每页大小
     * @return  返回Project集合
     */
    List<Project> selectByProjectPage(@Param("project") Project project, @Param("start") int start, @Param("limit") int limit);

    List<Project> selectByProjectPageById(@Param("project") Project project, @Param("start") int start, @Param("limit") int limit);

    /**
     * 查询项目总条数
     * @param project
     * @return
     */
    int selectCountProject(@Param("project") Project project);


    int insertProject(Project project);

    Project findProjectById(String projectId);

    Project findProjectByName(String projectName);

    int updateProject(Project project);

    int updateProjectById(Project project);

    int fileProjectById(Project project);
    int updateStatusByIds(@Param("projectIds")String [] ids,@Param("status") int status);

    List<Project> selectByProjectPageByPigeonhole(@Param("project") Project project, @Param("start") int start, @Param("limit") int limit);

    int recoveryProjectById(Project project);

    List<Project> selectByProjectPageByDelete(@Param("project") Project project, @Param("start") int start, @Param("limit") int limit);

    Project selectById(String projectId);

    Integer selectByProjectNum(String projectId);

    Integer selectByMyProjectNum(Long userId);
}
